<template>
	<view class="luntan-one">
		<view class="status_bar">
		</view>
		<view class="yujing-word1">
		<image src="../../../static/yujing/back.png" mode="" @click="to_shouye"></image>
			<view class="word1-word">
				论坛
			</view>
		</view>
		<view class="luntan-box">
			<view class="luntan-touxiang">
				<img src="../../../static/icon/jxvtc.jpg" alt="">
				<text class="luntan-username">彬彬刘</text>
			</view>
			<view class="luntan-content">
				<h4>诈骗犯为什么要诈骗老人</h4>
				<view class="luntan-text1">
					<text>我以为诈骗人诈骗年轻人的做法已经非常严重了，结果还是难逃老年人也.....</text>
				</view>
				<view class="luntan-img1">
					<img src="http://123.157.242.136:8089/wjk/mo1.png" alt="" >
				</view>
				<view class="luntan-icon">
					<img :src="index==0?'../../../static/icon/icon18.png':'../../../static/icon/icon19.png'" mode="" @click="luntan_dianji()"></img>
					<text class="luntan-num">{{dzNum}}</text>
				</view>
			</view>
			<pinlun></pinlun>
		</view>
	</view>
</template>

<script>
	import pinlun from "@/components/pinglun/pinglun.vue"
	export default {
		components: {
			pinlun
		},
		data() {
			return {
				sum:0,
				index:0,
				dzNum:23,
				luntanLists:[]
	
			}
		},
		onLoad:function(option){
			// console.log('option.id：'+option.id);
		},
		onShow() {
			
		},
		methods: {
			to_shouye(){
				uni.switchTab({
					url:"../shouye"
				})
			},
			luntan_dianji(){
				this.index=!this.index
				if(this.index==1){
					this.dzNum++;
				}else{
					this.dzNum--;
				}
			},
			mounted() {
				var that = this;
				
				uni.request({
					url: 'http://127.0.0.1:8080/luntandata/luntandatalist', //仅为示例，并非真实接口地址。
					method: 'GET',
					dataType:'json',
					data: {
			
					},
					header: {
						// 'custom-header': 'hello' //自定义请求头信息
					},
					success: (res) => {
						alert('666')
						console.log(res.data.data);
						that.luntanLists = res.data.data;
						console.log(that.luntanLists);
					}
				});
				}
			
		}
	}
</script>

<style>
	page {
		background-image: url(@/static/yujing/yujingbg.png);
		background-repeat: no-repeat;
		background-attachment: fixed;
		background-size: 100% 100%;
	}
	*{
		padding: 0%;
		margin: 0%;
	}
	image{
		display: flex;
	}
	.yujing-word1{
		width: 90%;
		height: 100rpx;
		margin: auto;
		margin-top: 40rpx;
		position: relative;
		
	}
	.word1-word{
		color: white;
		font-size: 40rpx;
		text-align: center;
		letter-spacing: 15rpx;
		
	}
	.yujing-word1 image{
		width: 50rpx;
		height: 50rpx;
		margin-top: 10rpx;
		position: absolute;
		top: 0;
		left: 0;
	}
	.luntan-box{
		width: 100%;
		height: 770rpx;
		margin-top: 60rpx;
		position: relative;
		background-color: white;
		border-bottom: #8c8c8c 10rpx solid;
	}
	.luntan-box img{
		width: 100px;
		height: 100px;
		border-radius: 50%;
		margin-top: 20rpx;
		margin-left: 20rpx;
		
	}
	.luntan-username{
		position: absolute;
		left: 140rpx;
		top: 50rpx;
	}
	.luntan-content h4{
		margin-left: 20rpx;
		
	}
	.luntan-text1{
		
	}
	.luntan-text1{
		width: 95%;
		height: 100rpx;
		margin: auto;
		margin-top: 15rpx;
	}
	.luntan-content text{
		width: 0%;
		height: 80rpx;
		font-size: 30rpx;
	}
	.luntan-img1 img{
		width: 90%;
		height: 300rpx;
		border-radius: 20rpx;
	}
	.luntan-icon img{
		width: 80rpx;
		height: 80rpx;
		
	}
	.luntan-icon{
		width: 120rpx;
		height:150rpx;
		margin: auto;
		
	}
	.luntan-num{
		width: 30rpx;
		height: 30rpx;
		
		margin-left: 45rpx;
		color: #a43485;
	}
	
</style>